﻿using Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Scheduledscheduling
{
    public partial class frm_verify : Form
    {
        User use;
        public frm_verify(User use)
        {
            this.use = use;
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            this.FormClosed += new FormClosedEventHandler(Frm_Closed);
        }

        private void Frm_Closed(object sender, FormClosedEventArgs e)
        {
            this.Close();
            Main frm = new Main(use);
            frm.Show();
            this.Hide();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(textBox1.Text))
            {
                if (use.UserToken== textBox1.Text.Trim())
                {
                    System.Environment.Exit(0);
                }
            }

        }
    }
}
